{{form()}}
<div class="center-block text-center">
    {% if reference %}
    {% if reference.type == 1 %}
    {{image(reference.content, 'class' : 'img-responsive question-img', 'id': 'question-img')}}
    {% else %}
    <div>{{reference.content}}</div>
    {% endif %}
    {% endif %}
    {% if audio %}
    <button class="btn black" data-url="{{url(audio.url)}}" id="listen"><i class="fa fa-music"></i></button>
    {% endif %}
    {% for question in questions %}
    <div class="question-number">{{'Câu '~question['id']}}</div>
    {% if question['question'] %}
    <div>Question: {{ question['question'] }}</div>
    {% endif %}
    {% if question['answerA'] %}
    <div><input name="answer[{{question['id']}}]" type="radio" value="A"/>A: {{ question['answerA'] }}</div>
    {% endif %}
    {% if question['answerB'] %}
    <div><input name="answer[{{question['id']}}]" type="radio" value="B"/>B: {{ question['answerB'] }}</div>
    {% endif %}
    {% if question['answerC'] %}
    <div><input name="answer[{{question['id']}}]" type="radio" value="C"/>C: {{ question['answerC'] }}</div>
    {% endif %}
    {% if question['answerD'] %}
    <div><input name="answer[{{question['id']}}]" type="radio" value="D"/>D: {{ question['answerD'] }}</div>
    {% endif %}
    {% endfor %}
    <button name="submit" class="btn black"><i class="fa fa-arrow-right"></i></button>
</div>
{{endform()}}

{{javascript_include('js/soundjs/soundjs-0.5.2.min.js')}}
{{javascript_include('js/exercise.js')}}